<template>
  <div class="SubView">
    <h2>订阅</h2>
    <div class="SubView_jiemu">
      <p>节目</p>
    </div>
  </div>
</template>

<script>
export default {
  name: "SubView",
  // 路由守卫判断是否登录
  beforeRouteEnter(to, from, next) {
    next((vm) => {
      if (!localStorage.getItem("user")) {
        vm.$toast({
          message: "还没登录呢",
          type: "fail",
        });
        next({
          path: "/LoginAndEgistration",
          query: {
            netxUrl: to.fullPath,
          },
        });
      } else {
        next();
      }
    });
  },
};
</script>

<style lang="scss" scoped>
.SubView {
  height: 100vh;
  padding: 0.875rem;

  .SubView_jiemu {
    p {
      width: 2.5rem;
      text-align: center;
      margin: 1.25rem 0;
      padding: 0.625rem 0.625rem 0.625rem 0;
      border-bottom: 2px solid #cfbd8d;
    }
  }
}
</style>